import dateFormat from 'dateformat'

export default (date, mode) => {
  if (mode) {
    return dateFormat(date, mode)
  }
  return dateFormat(date, 'yyyy-mm-dd')
}
